home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / FireMan.swf / scripts / frame_1174 / PlaceObject2_872_46 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2008-09-12  |  1.1 KB  |  56 lines

  1. onClipEvent(enterFrame){
  2.    _X = _X - heroe.scrollspeed;
  3.    _visible = false;
  4.    if(tenguman.zoom && setxy)
  5.    {
  6.       setxy = false;
  7.       start = true;
  8.       _X = xi;
  9.       _Y = yi;
  10.       if(tenguman.dx > 0)
  11.       {
  12.          _xscale = Math.abs(_xscale);
  13.          dx = SPEED;
  14.       }
  15.       else
  16.       {
  17.          _xscale = -1 * Math.abs(_xscale);
  18.          dx = -1 * SPEED;
  19.       }
  20.    }
  21.    if(start)
  22.    {
  23.       if(tenguman._x > _mapa._x + 120 && dx > 0)
  24.       {
  25.          _X = mapa._x;
  26.          _Y = mapa._y - 30;
  27.          start = false;
  28.          flow = true;
  29.       }
  30.       if(tenguman._x < _mapa._x + 240 - 120 && dx < 0)
  31.       {
  32.          _X = mapa._x + 240;
  33.          _Y = mapa._y - 30;
  34.          start = false;
  35.          flow = true;
  36.       }
  37.    }
  38.    if(flow)
  39.    {
  40.       _X = _X + dx;
  41.       if(dx > 0 && _X > mapa._x + 240)
  42.       {
  43.          dx = 0;
  44.          flow = false;
  45.          setxy = true;
  46.       }
  47.       if(dx < 0 && _X < mapa._x)
  48.       {
  49.          dx = 0;
  50.          flow = false;
  51.          setxy = true;
  52.       }
  53.    }
  54.    _visible = dx != 0 && Math.abs(tenguman._y - (mapa._y - 32)) <= 30;
  55. }
  56.